/**
 * 系统设置权限设置添加管理员
 */
import './index.less'
import tem from './index.html'
import $_fn from '~plugins'
class refundCtrl {
  constructor($scope,$rootScope,http,$ui) {
  	  console.log($scope.params)
      $scope.cancel = function () {
          $rootScope.$uiDirectiveModal.close() //关闭方法
      }
      //列表大小
      $('.modal-dialog').css('width','60%')
	  //还款明细数据
	   $scope.xingXi=function(){
      	  http.post('selectFundPlan.do',{oid:JSON.parse($scope.params).id},function (data) {
				if(data.errcode==1){
					$scope.param1=data.data
					console.log(data);
					$scope.$apply()
				}else{
					$ui.toast({
						text:data.errmsg,
						type:'warning',
						appendTo:'.refund'
					})
				}
	        },function(_data){
	            console.log(_data);//报错
	      })
      }
  	  $scope.xingXi();
  }
}
refundCtrl.$inject = ['$scope','$rootScope','http','$ui']
module.exports = angular.module('directive.refund', []).directive('refund', function() {
    return {
        template: tem,
        replace:true,
        controller: refundCtrl,
        scope:{
        	params:"@"
        }
    }
}).name